home *** CD-ROM | disk | FTP | other *** search
/ Programming Windows 95 with MFC / Programming Windows 95 with MFC (Microsoft Programming Series)(097-0001465)(1996).iso / CODE / Chap13 / Wanderer / Wanderer.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-05  |  919 b   |  41 lines

  1. //***********************************************************************
  2. //
  3. //  Wanderer.cpp
  4. //
  5. //***********************************************************************
  6.  
  7. #include <afxwin.h>
  8. #include <afxext.h>
  9. #include <afxcview.h>
  10. #include "Resource.h"
  11. #include "Wanderer.h"
  12. #include "MainFrame.h"
  13. #include "WandDoc.h"
  14. #include "DriveView.h"
  15.  
  16. CMyApp myApp;
  17.  
  18. BOOL CMyApp::InitInstance ()
  19. {
  20.     SetRegistryKey ("Programming Windows 95 with MFC");
  21.     LoadStdProfileSettings ();
  22.  
  23.     CSingleDocTemplate* pDocTemplate;
  24.     pDocTemplate = new CSingleDocTemplate (
  25.         IDR_MAINFRAME,
  26.         RUNTIME_CLASS (CWandDoc),
  27.         RUNTIME_CLASS (CMainFrame),
  28.         RUNTIME_CLASS (CDriveView)
  29.     );
  30.  
  31.     AddDocTemplate (pDocTemplate);
  32.  
  33.     CCommandLineInfo cmdInfo;
  34.     ParseCommandLine (cmdInfo);
  35.  
  36.     if (!ProcessShellCommand (cmdInfo))
  37.         return FALSE;
  38.  
  39.     return TRUE;
  40. }
  41.